#!/bin/bash  
  
# 定义一个函数来执行任务  
run_task() {  
    local aggregation=$1  
    local beta=$2  
    local dataset=$3  
    local model=$4
    local epochs=$5
  
    echo "Running task: $aggregation, $beta, $dataset, $model"  
    python main.py --aggregation=$aggregation --beta=$beta --dataset=$dataset --model=$model --epochs=$epochs
}  
  
# 执行任务列表  
#run_task "fedavg" 0.5 "mnist" "mnist_cnn" 50
#run_task "fedavg" 0.3 "mnist" "mnist_cnn" 50
#run_task "fedavg" 0.1 "mnist" "mnist_cnn" 50

#run_task "fedprox" 0.5 "mnist" "mnist_cnn" 50
#run_task "fedprox" 0.3 "mnist" "mnist_cnn" 50
#run_task "fedprox" 0.1 "mnist" "mnist_cnn" 50
  
run_task "fednova" 0.5 "mnist" "mnist_cnn" 50
run_task "fednova" 0.3 "mnist" "mnist_cnn" 50
run_task "fednova" 0.1 "mnist" "mnist_cnn" 50

#-----------------------------------------------------------

#run_task "fedavg" 0.5 "fmnist" "fmnist_cnn" 50
#run_task "fedavg" 0.3 "fmnist" "fmnist_cnn" 50
#run_task "fedavg" 0.1 "fmnist" "fmnist_cnn" 50
#
#run_task "fedavg" 0.5 "svhn" "svhn_cnn" 50
#run_task "fedavg" 0.3 "svhn" "svhn_cnn" 50
#run_task "fedavg" 0.1 "svhn" "svhn_cnn" 50
#
#run_task "fedavg" 0.5 "cifar10" "cnn" 50
#run_task "fedavg" 0.3 "cifar10" "cnn" 50
#run_task "fedavg" 0.1 "cifar10" "cnn" 50
#
#run_task "fedavg" 0.5 "cifar100" "cifar100_cnn" 50
#run_task "fedavg" 0.3 "cifar100" "cifar100_cnn" 50
#run_task "fedavg" 0.1 "cifar100" "cifar100_cnn" 50

#-----------------------------------------------------------

#run_task "fedprox" 0.5 "fmnist" "fmnist_cnn" 50
#run_task "fedprox" 0.3 "fmnist" "fmnist_cnn" 50
#run_task "fedprox" 0.1 "fmnist" "fmnist_cnn" 50

#run_task "fedprox" 0.5 "svhn" "svhn_cnn" 50
#run_task "fedprox" 0.3 "svhn" "svhn_cnn" 50
#run_task "fedprox" 0.1 "svhn" "svhn_cnn" 50

#run_task "fedprox" 0.5 "cifar10" "cnn" 50
#run_task "fedprox" 0.3 "cifar10" "cnn" 50
#run_task "fedprox" 0.1 "cifar10" "cnn" 50

#run_task "fedprox" 0.5 "cifar100" "cifar100_cnn" 50
#run_task "fedprox" 0.3 "cifar100" "cifar100_cnn" 50
#run_task "fedprox" 0.1 "cifar100" "cifar100_cnn" 50

#-----------------------------------------------------------

run_task "fednova" 0.5 "fmnist" "fmnist_cnn" 50
run_task "fednova" 0.3 "fmnist" "fmnist_cnn" 50
run_task "fednova" 0.1 "fmnist" "fmnist_cnn" 50

run_task "fednova" 0.5 "svhn" "svhn_cnn" 50
run_task "fednova" 0.3 "svhn" "svhn_cnn" 50
run_task "fednova" 0.1 "svhn" "svhn_cnn" 50

run_task "fednova" 0.5 "cifar10" "cnn" 50
run_task "fednova" 0.3 "cifar10" "cnn" 50
run_task "fednova" 0.1 "cifar10" "cnn" 50

run_task "fednova" 0.5 "cifar100" "cifar100_cnn" 50
run_task "fednova" 0.3 "cifar100" "cifar100_cnn" 50
run_task "fednova" 0.1 "cifar100" "cifar100_cnn" 50